# !/usr/bin/env python3
# -*- coding: utf-8 -*-
###----------------------------------------------------1、文件说明----------------------------------------------------###
'''
* 说明：帮助编写程序的小函数
* 时间：2021-2-5
* 文件：
* 作者：whg
* 备注：
'''
###----------------------------------------------------2、库导入----------------------------------------------------###
from functools import wraps
from types import FunctionType,BuiltinFunctionType,MethodType
###----------------------------------------------------3、参数配置----------------------------------------------------###
###----------------------------------------------------4、主体程序----------------------------------------------------###

def debuginfo(f):
    '''
    打印调试信息的
    :param f:
    :return:
    '''
    @wraps(f)
    def decorated(*args, **kwargs):
        print("当前函数：", f.__code__.co_name, f.__code__.co_firstlineno)
        return f(*args, **kwargs)
    return decorated

def GetClassValue(sclass):
    print("Get Class ", type(sclass))
    for i in dir(sclass):
        tmp = getattr(sclass, i)
        if isinstance(tmp, FunctionType) or isinstance(tmp, BuiltinFunctionType):
            print(i, "\t", type(tmp), "Function")
        else:
            print(i, "\t", type(tmp), tmp)

if __name__ == '__main__':
    print('Start Program...\r\n')
    slist = [1,3,54]
    GetClassValue(slist)
    print(type(slist))
    print('\nSuccess ...')